package com.demo;

import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.Test;

/**
 * Created by Administrator on 2017/7/6.
 */
public class CrossApp extends BasicTestCase{

    @Test
    public void testName() throws Exception {

       /* Thread.sleep(10000);*/
        WebDriverWait wait = new WebDriverWait(driver,10);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.netease.newsreader.activity:id/bfw")));
        driver.findElements(By.id("com.netease.newsreader.activity:id/bfw")).get(1).click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.netease.newsreader.activity:id/an8")));
        driver.findElements(By.id("com.netease.newsreader.activity:id/an8")).get(2).click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.netease.newsreader.activity:id/dy")));
        driver.findElements(By.id("com.netease.newsreader.activity:id/dy")).get(5).click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.netease.newsreader.activity:id/icon")));
        driver.findElements(By.id("com.netease.newsreader.activity:id/icon")).get(0).click();
        Thread.sleep(6000);
    }

}
